package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class BookList {
    private Book[] books = new Book[10];
    private int useSize;

    public BookList(){
        books[0] = new Book("三国演义","罗贯中",17,"小说");
        books[1] = new Book("西游记","吴承恩",47,"小说");
        books[2] = new Book("水浒传","施耐庵",37,"小说");
        this.useSize = 3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    //在pos位置获取一本书
    public Book getPos(int pos){
        return this.books[pos];
    }

    //设置pos下标为一本书
    public void setPos(int pos, Book book){
        this.books[pos] = book;
    }
}
